(function() {
  var Collection, DataSources, Wines, config;

  Collection = require('models/base/collection');

  Wines = require('models/wines');

  config = require('appConfig');

  module.exports = DataSources = (function() {
    var _wines;

    DataSources.name = 'DataSources';

    function DataSources() {}

    _wines = null;

    DataSources.GetWines = function() {
      if (_wines === null) {
        console.debug('DataSources#fetchingWines');
        _wines = new Wines();
        _wines.url = config.api.versionRoot + '/wines';
        _wines.fetch();
        console.debug('DataSources#WinesLoaded');
      }
      return _wines;
    };

    return DataSources;

  })();

}).call(this);
